<%@ page language="java" contentType="text/html; charset=utf-8"
   import="com.vo.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	<% 
		User userinfo=(User)session.getAttribute("userinfo"); 
	%>
	<form action="ModifyUserServlet" method="post">
		<table >
			<tr>
				<td>ID:</td>
				<td><input type="text" name="id" value="<%=userinfo.getId() %>" readonly="readonly" /></td>
			</tr>
			<tr>
				<td>用户名:</td>
				<td><input type="text" name="username" value="<%=userinfo.getUsername()%>"/></td>
			</tr>
			<tr>
				<td>密码:</td>
				<td><input  type="password" name="password" value="<%=userinfo.getPassword()%>"/></td>
			</tr>
			<tr>
				<td>密保问题:</td>
				<td>
					<select name="question">
						<option value="你喜欢吃什么" <%= "你喜欢吃什么".equals(userinfo.getQuestion()) ? "selected" : "" %>>你喜欢吃什么</option>
						<option value="你喜欢喝什么" <%= "你喜欢喝什么".equals(userinfo.getQuestion()) ? "selected" : "" %>>你喜欢喝什么</option>
						<option value="你喜欢玩什么" <%= "你喜欢玩什么".equals(userinfo.getQuestion()) ? "selected" : "" %>>你喜欢玩什么</option>
					</select>

				</td>
			</tr>
			<tr>
				<td>答案:</td>
				<td><input type="text" name="answer" value="<%=userinfo.getAnswer()%>"/></td>
			</tr>
			<tr>
				<td>用户类型:</td>
				<td><input type="text" name="type" value="<%=userinfo.getType()%>" readonly/></td>
			</tr>
			<tr>
				<td><input type="submit" value="确认修改"/></td>
			</tr>
		</table>
	</form>


</body>
</html>